<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/jquery.min.js"></script>
	</head>
	<body>
		<div>
			<div>编号:<span id="item"></span></div>
			<div>价格:<span id="itemprice"></span></div>
		</div>
	</body>
	<script>
		var jsonstr = '[{"p":"4879.00","op":"5299.00","cbf":"0","id":"J_100008348542","m":"6000.00"}]'
		console.log(jsonstr);
		//parse方法把数据转成字符串
		var items = JSON.parse(jsonstr);
		console.log(items[0]);
		console.log(items[0].p);
		console.log(items[0].id);

		$("#item").text(items[0].id);
		
		$("#itemprice").text(items[0].p);
		$("#itemprice").css("color", "red");
	</script>
</html>
